package com.ruoyi.game.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.game.mapper.GameEcpmRecordMapper;
import com.ruoyi.game.domain.GameEcpmRecord;
import com.ruoyi.game.service.IGameEcpmRecordService;

/**
 * ECPM记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-22
 */
@Service
public class GameEcpmRecordServiceImpl implements IGameEcpmRecordService 
{
    @Autowired
    private GameEcpmRecordMapper gameEcpmRecordMapper;

    /**
     * 查询ECPM记录
     * 
     * @param ecpmId ECPM记录主键
     * @return ECPM记录
     */
    @Override
    public GameEcpmRecord selectGameEcpmRecordByEcpmId(Long ecpmId)
    {
        return gameEcpmRecordMapper.selectGameEcpmRecordByEcpmId(ecpmId);
    }

    /**
     * 查询ECPM记录列表
     * 
     * @param gameEcpmRecord ECPM记录
     * @return ECPM记录
     */
    @Override
    public List<GameEcpmRecord> selectGameEcpmRecordList(GameEcpmRecord gameEcpmRecord)
    {
        return gameEcpmRecordMapper.selectGameEcpmRecordList(gameEcpmRecord);
    }

    /**
     * 新增ECPM记录
     * 
     * @param gameEcpmRecord ECPM记录
     * @return 结果
     */
    @Override
    public int insertGameEcpmRecord(GameEcpmRecord gameEcpmRecord)
    {
        return gameEcpmRecordMapper.insertGameEcpmRecord(gameEcpmRecord);
    }

    /**
     * 修改ECPM记录
     * 
     * @param gameEcpmRecord ECPM记录
     * @return 结果
     */
    @Override
    public int updateGameEcpmRecord(GameEcpmRecord gameEcpmRecord)
    {
        gameEcpmRecord.setUpdateTime(DateUtils.getNowDate());
        return gameEcpmRecordMapper.updateGameEcpmRecord(gameEcpmRecord);
    }

    /**
     * 批量删除ECPM记录
     * 
     * @param ecpmIds 需要删除的ECPM记录主键
     * @return 结果
     */
    @Override
    public int deleteGameEcpmRecordByEcpmIds(Long[] ecpmIds)
    {
        return gameEcpmRecordMapper.deleteGameEcpmRecordByEcpmIds(ecpmIds);
    }

    /**
     * 删除ECPM记录信息
     * 
     * @param ecpmId ECPM记录主键
     * @return 结果
     */
    @Override
    public int deleteGameEcpmRecordByEcpmId(Long ecpmId)
    {
        return gameEcpmRecordMapper.deleteGameEcpmRecordByEcpmId(ecpmId);
    }
}
